// 文件上传相关的请求

import service from "./index";

// 文件上传
export function uploadFile(file) {
  const formData = new FormData();
  formData.append("file", file);
  return service({
    url: "/files/upload",
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    data: formData,
  });
}
